﻿@model _PLATFORM.DATA.TEMPLATE

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jpicker-1.1.6.js")" type="text/javascript"></script>

<script type="text/javascript">
          $(function () {
              $.fn.jPicker.defaults.images.clientPath = '../../Assets/images/jpicker/';
              var LiveCallbackElement = $('#Live'),
                LiveCallbackButton = $('#LiveButton');

              $('#AccentColor').jPicker({ 
				    window: // used to define the position of the popup window only useful in binded mode
				      {
					    title: null, // any title for the jPicker window itself - displays "Drag Markers To Pick A Color" if left null
					    effects:
					    {
					      type: 'slide', // effect used to show/hide an expandable picker. Acceptable values "slide", "show", "fade"
					      speed:
					      {
						    show: 'slow', // duration of "show" effect. Acceptable values are "fast", "slow", or time in ms
						    hide: 'fast' // duration of "hide" effect. Acceptable value are "fast", "slow", or time in ms
					      }
					    },
					    position:
					    {
					      x: 'screenCenter', // acceptable values "left", "center", "right", "screenCenter", or relative px value
					      y: 'bottom', // acceptable values "top", "bottom", "center", or relative px value
					    },
					    expandable: false, // default to large static picker - set to true to make an expandable picker (small icon with popup) - set
									       // automatically when binded to input element
					    liveUpdate: true, // set false if you want the user to click "OK" before the binded input box updates values (always "true"
									      // for expandable picker)
					    alphaSupport: false, // set to true to enable alpha picking
					    alphaPrecision: 0, // set decimal precision for alpha percentage display - hex codes do not map directly to percentage
									       // integers - range 0-2
					    updateInputColor: true // set to false to prevent binded input colors from changing
				      },

		      });
		  
		      $('#NavColor').jPicker({ 
				    window: // used to define the position of the popup window only useful in binded mode
				      {
					    title: null, // any title for the jPicker window itself - displays "Drag Markers To Pick A Color" if left null
					    effects:
					    {
					      type: 'slide', // effect used to show/hide an expandable picker. Acceptable values "slide", "show", "fade"
					      speed:
					      {
						    show: 'slow', // duration of "show" effect. Acceptable values are "fast", "slow", or time in ms
						    hide: 'fast' // duration of "hide" effect. Acceptable value are "fast", "slow", or time in ms
					      }
					    },
					    position:
					    {
					      x: 'screenCenter', // acceptable values "left", "center", "right", "screenCenter", or relative px value
					      y: 'bottom', // acceptable values "top", "bottom", "center", or relative px value
					    },
					    expandable: false, // default to large static picker - set to true to make an expandable picker (small icon with popup) - set
									       // automatically when binded to input element
					    liveUpdate: true, // set false if you want the user to click "OK" before the binded input box updates values (always "true"
									      // for expandable picker)
					    alphaSupport: false, // set to true to enable alpha picking
					    alphaPrecision: 0, // set decimal precision for alpha percentage display - hex codes do not map directly to percentage
									       // integers - range 0-2
					    updateInputColor: true // set to false to prevent binded input colors from changing
				      },

		      });

          });
    </script>

@using (Html.BeginForm("Create", "Template", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
        
            <input type="submit" value="Create Template" class="default button btnSmall" style="float:right; position:absolute; bottom: 200px; right:250px;" />
            <br />
            <div style="width: 300px; height: 350px; overflow: hidden; float: left;">
                <div class="editor-label">
                    <h4>Company Name</h4> (To Appear on Template)
                </div>
                <div class="editor-field">
                
                    @Html.TextBoxFor(model => model.NAME) 
                    @Html.ValidationMessageFor(model => model.NAME) 
                </div>
                <br />
                <div class="editor-label">
                    <h4>Company Logo</h4>
                </div>
                        
                <div id="dialog" title="Upload files"> 
                        @*<div class="themeLogoBox">
                            <br /><br /><br />
                            No File Selected
                        </div>*@
                    <input type="file" id="file1" name="file1" value="Upload" />
                </div>
            </div>
                    
            <div style="width: 600px; height: 350px; overflow: hidden; float: right;">
                <h4>Color Scheme</h4>

                <div class="themeBox">
                    <b>Contrast Color</b> (Links, Buttons, Highlights):<br />
                    <input id="AccentColor" name="AccentColor" type="text" value="00aeef" />
                </div>
                <br style="clear:both;" />
                <div class="themeBox">
                    <b>Navigation Bar Color</b>:<br />
                    <input id="NavColor" name="NavColor" type="text" value="000000" />
                </div>
                <br style="clear:both;" />

            </div>
            <table>
                <tr>
                    <td>
                        Use Parent Inventory?
                    </td>
                    <td>
                        <input id="Chk_UseResellerInventory" name="Chk_UseResellerInventory" type="checkbox" checked="checked" />
                    </td>
                </tr>
            </table>
            
            <div class="bottomDivider"><br /></div>

}

@*<div>
    @Html.ActionLink("Back to List", "Index")
</div>*@
